﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WucCloud.Utility;

namespace WucCloud.Entity
{
    /// <summary>
    /// 用户信息实体
    /// </summary>
    [Serializable]
    [SugarTable("Sys_UserInfo","用户信息表")]
    [Tenant("0")]
    public class UserInfoEntity : BaseEntity<string>
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public UserInfoEntity()
        {
            
        }

        /// <summary>
        /// 编码/工号
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "EnCode", ColumnDataType = "nvarchar(50)", ColumnDescription = "编码/工号")]
        public string EnCode { get; set; }
        /// <summary>
        /// 账户名
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "AccountName", ColumnDataType = "nvarchar(50)", ColumnDescription = "账户名")]
        public string AccountName { get; set; }
        /// <summary>
        /// 登录密码
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "Password", ColumnDataType = "nvarchar(50)", ColumnDescription = "登录密码")]
        public string Password { get; set; }
        /// <summary>
        /// 昵称
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "NickName", ColumnDataType = "nvarchar(50)", ColumnDescription = "昵称")]
        public string NickName { get; set; }
        /// <summary>
        /// 真实姓名
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "RealName", ColumnDataType = "nvarchar(50)", ColumnDescription = "真实姓名")]
        public string RealName { get; set; }        
        /// <summary>
        /// 头像
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "AvatarUrl", ColumnDataType = "nvarchar(max)", ColumnDescription = "头像")]
        public string AvatarUrl { get; set; }
        /// <summary>
        /// 性别(true：男 false：女)
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "Gender", ColumnDescription = "性别")]
        public bool? Gender { get; set; }
        /// <summary>
        /// 年龄
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "Age", ColumnDescription = "年龄")]
        public int? Age { get; set; }
        /// <summary>
        /// 生日
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "Birthday", ColumnDescription = "生日")]
        public DateTime? Birthday { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "MobilePhone", ColumnDataType = "nvarchar(20)", ColumnDescription = "手机号")]
        public string MobilePhone { get; set; }
        /// <summary>
        /// 邮箱地址
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "Email", ColumnDataType = "nvarchar(50)", ColumnDescription = "邮箱地址")]
        public string Email { get; set; }
        /// <summary>
        /// 微信号
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "WeChat", ColumnDataType = "nvarchar(50)", ColumnDescription = "微信号")]
        public string WeChat { get; set; }
        /// <summary>
        /// 个性签名
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "Signature", ColumnDataType = "nvarchar(50)", ColumnDescription = "个性签名")]
        public string Signature { get; set; }
        /// <summary>
        /// 是否管理员
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "IsAdmin", ColumnDescription = "是否管理员")]
        public bool? IsAdmin { get; set; }

        /// <summary>
        /// 用户登录状态 0-离线 1-在线
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "SignState", ColumnDescription = "用户登录状态")]
        public int? SignState { get; set; }

        /// <summary>
        /// 是否锁定 0-未锁定 1-锁定
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "IsLock", ColumnDescription = "是否锁定")]
        public bool? IsLock { get; set; }

        /// <summary>
        /// 最后登录时间
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "LastLoginTime", ColumnDescription = "最后登录时间")]
        public DateTime? LastLoginTime { get; set; }

        #region 拓展字段
        ///// <summary>
        ///// 所属部门
        ///// </summary>
        //[SugarColumn(IsNullable = true, ColumnName = "DepartmentId", ColumnDataType = "nvarchar(max)", ColumnDescription = "所属部门")]
        //public string DepartmentId { get; set; }
        ///// <summary>
        ///// 所属岗位
        ///// </summary>
        //[SugarColumn(IsNullable = true, ColumnName = "DutyId", ColumnDataType = "nvarchar(max)", ColumnDescription = "所属岗位")]
        //public string DutyId { get; set; }
        ///// <summary>
        ///// 所属角色
        ///// </summary>
        //[SugarColumn(IsNullable = true, ColumnName = "RoleId", ColumnDataType = "nvarchar(max)", ColumnDescription = "所属角色")]
        //public string RoleId { get; set; }
        #endregion
    }
}
